@charset "utf-8";

*{
    margin: 0;
    padding: 0;
}
//rem换算函数
@function r($px){
    @return ($px/40)*1rem; 
}
#index{
    width: 400px;
    height: 100vh;
    background-position: 0% 0%;
    position: absolute;
    left: 55%;
    margin-left: -300px;
    overflow: hidden;
    max-height: 812px;
    background-image: url(../img/luckyDraw/ld_bg.jpg);
    background-size: cover;
     //logo
    #logo{
        width: 100%;
        position: absolute;
        left: 75%;
        top: 5%;
        transform: translateX(-50%);
        img{
            width: 50%;
            top: 8%;
        }
    }
    #allImg{
        width: 100%;
        height:100%;
        position: relative;
        img{
            position:absolute;
            left: 50%;
            transform: translateX(-50%);
        }
        #img1{
            width: 50%;
            top: 25%;
            z-index: 2;
            transform:translateX(-50%) scale(1,1);
        }
         .img1Play{
            animation: img1Move 1s;
        }
        @keyframes img1Move{
            0%{transform:translateX(-50%) scale(0,0)}
            100%{transform:translateX(-50%) scale(1,1)}
        }
        #img2{
            width: 20%;
            top: 38%;
            left: 23%;
            z-index: 2;
        }
        #img3{
            width: 92%;
            top: 15%;
            
        }
        #img4{
            width: 15%;
            top: 45%;
            left: 12%;
        }
        #img5{
            width: 10%;
            top: 50%;
            left: 93%;
        }
        #img6{
            width: 10%;
            top: 56%;
            left: 15%;
        }
        #img7{
            width: 5%;
            top: 42%;
            left: 84%;
        }
        #img8{
            width: 5%;
            top: 51%;
            left: 22%;
        }
        #img9{
            width: 10%;
            top: 56%;
            left: 79%;
        }
    }
    //参与提示信息
    #tips{
        margin: 0;
        width: 100%;
        height: 20vh;
        position: absolute;
        top: 65%;
        left: 50%;
        transform: translateX(-50%);
        .divTips2{
            height: r(20);
            font-size: r(6);
            color: white;
            text-align: center;
            margin-top: r(15);
        }
    }
     //按钮
    #allBtn{
        position: absolute;
        left: 50%;
        top: 80%;
        transform: translateX(-50%);
        width: 100%;
        .btn{
            background-color: rgba(255,0,0,0); 
            border: 1px solid rgb(255,271,159);
            color: rgb(255,271,159);
        }
        &>div:first-of-type{
            margin-left: 3%;
        }
    }
    //模态框
    #myModal{
        margin: 0;
        padding: 0;
        width: 400px;
        height: 100vh;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        .modal-dialog{
            margin: 0;
        }
        //模态框内容
        .modal-content{
            width: 400px;
            height: 100vh;
            margin-top: 20vh;
            background-color: rgba(0,0,0,0);
            border: none;
            box-shadow: none;
            //模态框主体
            .modal-body{
                padding:0 ;
                margin: 0;
                position: relative;
                width: 100%;
                height: 100%;
                img{
                    width: 80%;
                }
                &>img:first-of-type{
                    position: absolute;
                    top: -10%;
                    left: 10%;
                }
                &>img:last-of-type{
                    width: 6%;
                    position: fixed;
                    top: -8%;
                    left: 75%;
                }
            }
        }
    }
}



@media (max-width:768px){
    #index{
        width:100%;
        left: 0%;
        margin-left: 0px;
        background-size: cover;
    }
    #index #tips .divTips2{
        height: r(40);
        font-size: r(25);
        color: white;
        text-align: center;
        margin-top: r(70);
    }
    #index #myModal{
        width: r(700);
    }
     #index #myModal .modal-content{
        width: r(700);
    }
     #index #myModal .modal-content .modal-body{
        width: r(700);
    }
    
}